The use of PC-based graphics packages has become widespread. Unfortunately, it has been difficult to use their output on host based printers. For example, it is often desirable to include graphic output in Document Composition Facility (DCF) (Script) documents. Or it might be required to use a host connected color printer. One solution is to use a graphics data interchange metafile format which is subsequently converted to a host based Graphics Data Display Manager (GDDM) graphics file format. This metafile format is available as the Computer Graphics Metafile (CGM) which is a standard graphics data interchange file (ANSI X3.122, ISO 8632-1). It is available for export and import with many PC graphics applications (e.g., Freelance Plus, Harvard Graphics).
Converting a CGM to a Graphics Data Format (GDF) (IBM GDDM Graphics Data File) while conceptually straightforward becomes complex as one focuses on details. As an example consider the conversion of one graphic attribute, color. The color attributes in both graphics metafiles can be specified by integer index values, however, GDDM defines only 18 values including neutral, background, true black and true white, whereas, the CGM index values can vary up to 32K (maximum positive integer at 16 bit color index precision) with the values being defined by RGB (red, green, blue) coordinates. For some applications the range of color index values is small (12 for Freelance Plus), while in others it can be large, with many shades, tints and hues possible.
As the CGM usually contains sufficient information to determine the CGM origin one could code unique color index conversion procedures for each application. Given the wide range of available applications and the possibility of color modification in each application this soon becomes futile. One solution is to open the color attribute conversion process to the user by using a conversion profile customizable for the application. This could be as simple as a straight-forward look-up table. In fact, early versions of the CGM to GDF and GDF to CGM converters did exactly that. Unfortunately the same table does not suffice for conversion in both directions, as the mapping is not always 1 to 1. The same situation exists for most other graphic attributes such as line type, hatch patterns, markers, and even in some respects with fonts. An attribute conversion profile table circumvents many of the problems. However, different profiles for each conversion direction for each application run into coordination problems when converting back and forth between GDF and varying CGM generator/interpreter applications.
According to the present invention, a single bi-directional graphics attribute conversion profile is utilized to mediate in the conversion process for each application. The conversion profile consists of keywords and free form attribute arrays.